﻿using System;
using System.Collections;
using System.Linq;
using System.Text;
using System.Data;

namespace DCTAccess.Business.Administrator
{
    public class AdministratorCollection : CollectionBase
    {
        public AdministratorCollection() { }

        public AdministratorCollection(DataTable adminDatatable)
        {
            foreach (DataRow adminInfo in adminDatatable.Rows)
            {
                Add(new Administrator(adminInfo));
            }
        }

        public int Add(Administrator admin)
        {
            return base.List.Add(admin);
        }

        public int IndexOf(Administrator admin)
        {
            return base.List.IndexOf(admin);
        }

        public Administrator this[int index]
        {
            get
            {
                return (Administrator)base.List[index];
            }
        }
    }
}
